package umls.expander;

import java.util.ArrayList;
import java.util.Iterator;

public class GeneExpandedSet {
	private String NameSearch;
	private ArrayList<String> CuiList;
	private ArrayList<String> AssociatedCuiList;
	private ArrayList<String> AssociateStringList;

	public GeneExpandedSet() {
		NameSearch = "";
		CuiList = new ArrayList<String>();
		AssociatedCuiList = new ArrayList<String>();
		AssociateStringList = new ArrayList<String>();
	}

	public void SetNameSearch(String Name) {
		this.NameSearch = Name;
	}

	public void SetCuiList(ArrayList<String> CuiList) {
		this.CuiList = CuiList;
	}

	public void SetAssociatedCuiList(ArrayList<String> AssociatedCuiList) {
		this.AssociatedCuiList = AssociatedCuiList;
	}

	public void SetAssociateStringList(ArrayList<String> AssociateStringList) {
		this.AssociateStringList = AssociateStringList;
	}

	public String GetNameSearch() {
		return this.NameSearch;
	}

	public ArrayList<String> GetCuiList() {
		return this.CuiList;
	}

	public ArrayList<String> GetAssociatedCuiList() {
		return this.AssociatedCuiList;
	}

	public ArrayList<String> GetAssociateStringList() {
		return this.AssociateStringList;
	}

	public void AddAssociateStringList(ArrayList<String> AssociateStringList) {
		Iterator<String> string_it = AssociateStringList.iterator();

		while (string_it.hasNext()) {
			this.AssociateStringList.add(string_it.next());
		}
	}

	public void AddAssociateCuiList(ArrayList<String> AssociateCuiList) {
		Iterator<String> cui_it = AssociateCuiList.iterator();

		while (cui_it.hasNext()) {
			this.AssociatedCuiList.add(cui_it.next());
		}
	}

	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		String NEW_LINE = System.getProperty("line.separator");

		Iterator<String> cuilist_it = this.CuiList.iterator();

		while (cuilist_it.hasNext()) {
			result.append("CUI: " + cuilist_it.next() + NEW_LINE);
		}

		Iterator<String> associatedcuilist_it = this.AssociatedCuiList
				.iterator();

		while (associatedcuilist_it.hasNext()) {
			result.append("Associated CUI " + associatedcuilist_it.next()
					+ NEW_LINE);
		}

		Iterator<String> associatedstringlist_it = this.AssociateStringList
				.iterator();

		while (associatedstringlist_it.hasNext()) {
			result.append("Associated String " + associatedstringlist_it.next()
					+ NEW_LINE);
		}

		return result.toString();
	}

}
